<script module lang="ts">
    import { defineMeta } from "@storybook/addon-svelte-csf";
    import Radio from "./Radio.svelte";
    import { fn } from "storybook/test";
    import { Space } from "../Space";
    import { Button } from "../Button";
    import Icon from "@iconify/svelte";

    const { Story } = defineMeta({
        title: "Components/Form/Radio",
        component: Radio,
        tags: ["autodocs"],
        argTypes: {},
        args: {},
    });
</script>

<Story name="Default">
    {#snippet template(args)}
        <Radio name="type" value="1" label="苹果" />
    {/snippet}
</Story>

<Story name="Disabled" args={{ disabled: true }}>
    {#snippet template(args)}
        <Radio name="type" value="1" label="苹果" {...args} />
    {/snippet}
</Story>

<Story name="Extra">
    {#snippet template(args)}
        <Radio disabled name="type" value="1" label="苹果" extra="不断提高要求，延迟满足感，在更大范围里找最优解" />
        <Radio name="type" value="1" label="苹果" extra="不断提高要求，延迟满足感，在更大范围里找最优解" />
    {/snippet}
</Story>
